import { createBrowserRouter } from 'react-router-dom';
import {lazy} from "react";
import Statistics from '@/pages/statistics';
const Login =lazy(()=>import('@pages/login'))
const Home =lazy(()=>import('@pages/home'))
const Layout =lazy(()=>import('@pages/layout'))
const Tools =lazy(()=>import('@pages/tools'))
const Settings =lazy(()=>import('@pages/mobile/settings'))
const router=createBrowserRouter([
  {
    path:'/',
    element:<Layout/>,
    children:[
      {
        index:true,
        element:<Home/>
      },
      {
        path:"tools",
        element:<Tools/>
      },
      {
        path:"statistics",
        element:<Statistics/>
      },
      {
        path:"settings",
        element:<Settings/>
      }
    ]
  },
  {
    path:"login",
    element:<Login></Login>
  }
])
export const routes = router